//
//  MoreLabelViewController.swift
//  KaMengApplication
//
//  Created by DUONIU_MAC on 2018/9/19.
//  Copyright © 2018年 DUONIU_MAC. All rights reserved.
//

import UIKit

class MoreLabelViewController: KMViewController {
    
    var labelBlock : ((IndexPath)->Void)?
    
    /// 状态栏颜色
    override var preferredStatusBarStyle: UIStatusBarStyle {
        return .default
    }

    override func viewDidLoad() {
        super.viewDidLoad()
        
        if KMTool.isNewiPhone() {
            KMTool.changeStatusColor(color: UIColor.red)
        }
        
        let moreLabelView = MoreLabelView.init(frame: .init(x: 0, y: StatusBarHeight, width: ScreenW, height: ScreenH-20))
        moreLabelView.labelDelegate = self
        self.view.addSubview(moreLabelView)
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()


        
    }

}

extension MoreLabelViewController : MoreLabelViewDelegate {
    
    //MARK: 选择标签
    func selectLabel(index: IndexPath) {
        self.labelBlock!(index)
        self.dismiss(animated: false, completion: nil)
    }
    
    //MARK: 返回
    func backAction() {
        self.dismiss(animated: false, completion: nil)
    }
}
